//
//  ClassroomListViewController.m
//  AnXin100
//
//  Created by 王合润 on 10/24/18.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "ClassroomListViewController.h"
#import "ClassroomListTableViewCell.h"
@interface ClassroomListViewController ()<UITableViewDelegate, UITableViewDataSource>

@property (nonatomic, strong) UITableView *mainTable;

@end

@implementation ClassroomListViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.view addSubview:self.mainTable];
}

#pragma lazy load
- (UITableView *)mainTable {
    if (!_mainTable) {
        _mainTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, Hi-Hn - 145 - 44) style:UITableViewStylePlain];
        _mainTable.delegate = self;
        _mainTable.dataSource = self;
        _mainTable.separatorStyle = UITableViewCellSeparatorStyleNone;
        [_mainTable registerNib:[UINib nibWithNibName:@"ClassroomListTableViewCell" bundle:nil] forCellReuseIdentifier:@"ClassroomListTableViewCell"];
    }
    return _mainTable;
}

#pragma mark - UITableView Delegate

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 130;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    ClassroomListTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"ClassroomListTableViewCell"];
    return cell;
    
}



@end
